<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>练习</title>
  <script>

    var arr = ['bule', 'red', 'green', 'yellow'];
    // console.log(arr.toString())
    // console.log(arr.valueOf())
    // console.log(arr.join())
    // console.log(arr.toLocaleString())

    let apush = arr.push('black')
    console.log(arr, apush);
    let apop = arr.pop()
    console.log(arr, apop);
    let ashift = arr.shift();
    console.log(arr, ashift);

    let arr2 = [2, 33, 3, 4, 12, 56, 32, 99, 8]

    let arr3 = arr2.sort((val1, val2) => val1 - val2)
    console.log('arr3', arr3);
    console.log('arr2', arr2);
  </script>
</head>

<body>

</body>

</html>